window.onload = function () {
    /* 微信规范已经不允许打开就强制登录
    if (isWxBrowser()) {
        setLoginInfo(function (json) {
            if (json.code !== 0) {
                window.location.href = "/auth/wechat/login";
            }
        });
    }*/
};
//检查是否微信浏览
function isWxBrowser() {
    var browser = navigator.userAgent.toLowerCase();
    var phone = /micromessenger/i;
    return phone.test(browser);
}
//获取登录用户
function setLoginInfo(callback) {
    axios.get('/ajax/user/current/info.json').then(function (json) {
        callback(json.data);
    });
}